<?php /* Smarty version 2.6.20, created on 2016-07-19 15:15:23
         compiled from ./supplieProducts/index.php */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'shops', './supplieProducts/index.php', 11, false),array('block', 'supplieProducts', './supplieProducts/index.php', 46, false),array('block', 'classes', './supplieProducts/index.php', 57, false),array('block', 'rights', './supplieProducts/index.php', 90, false),array('function', 'url', './supplieProducts/index.php', 104, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/top.php", 'smarty_include_vars' => array('subject' => 'supplieProducts')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "supplieProducts/top.php", 'smarty_include_vars' => array('subject' => 'supplieProducts')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="content">
<div id="boxquery">
    <form method="get">
         <input type="hidden" name="m" value="inventory" />
        <input type="hidden" name="s" value="supplieProducts.php" />
        <input type="submit" value="查询" class="fr" />
        <ul>
        <li><div style="line-height: 15px;float:left;">产品ID:&nbsp; </div><textarea id="product_id" name="product_id" style="resize:horizontal;float:left;height:30px;"><?php echo $_GET['product_id']; ?>
</textarea></li>
        <li>仓库:&nbsp; <select id="shopid" name="shopid" onchange="$('[shopid]').hide();$('[shopid='+this.value+']').show();"><option value="">全部</option><?php $this->_tag_stack[] = array('shops', array()); $_block_repeat=true;smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><option value="<?php echo $this->_tpl_vars['shops']['id']; ?>
" <?php if ($this->_tpl_vars['shops']['id'] == $_GET['shopid']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['shops']['title']; ?>
</option><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></select></li>
        <li>
        	供应商:&nbsp; <select name="supplier_id">
        		<option value="">---请选择---</option>
        		<?php $_from = $this->_tpl_vars['suppliers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
        			<option value="<?php echo $this->_tpl_vars['item']['id']; ?>
" <?php if ($this->_tpl_vars['item']['id'] == $_GET['supplier_id']): ?>selected<?php endif; ?> shopid="<?php echo $this->_tpl_vars['item']['shopid']; ?>
" ><?php echo $this->_tpl_vars['item']['title']; ?>
</option>
        		<?php endforeach; endif; unset($_from); ?>
        	</select>
        </li>
        <li>产品关键字:&nbsp; <input id="keywords" name="keywords" type="text" size="30" value="<?php echo $_GET['keywords']; ?>
" />
        </li>
		<li>采购价:&nbsp; <input id="lprice" name="lprice" type="text" size="6" value="<?php echo $_GET['lprice']; ?>
"/>-<input id="hprice" name="hprice" type="text" size="6" value="<?php echo $_GET['hprice']; ?>
"/>
        </li>
        <li>库存:&nbsp; <input id="lstock" name="lstock" type="text" size="6" value="<?php echo $_GET['lstock']; ?>
"/>-<input id="hstock" name="hstock" type="text" size="6" value="<?php echo $_GET['hstock']; ?>
"/>
        </li>
        </ul>
    </form>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="5" id="lister">
      <tr id="title">
        <td width="40">SKU_ID</td>
        <td width="40">产品ID</td>
        <td>产品图片</td>
        <td>产品名称</td>
        <td>发货仓</td>
        <td width="160">供应商(负责人)</td>
        <td>采购单价</td>
        <td>货币单位</td>
        <td>库存(余/总)</td>
        <td>默认供应商</td>
        <td>主站状态</td>
        <td>微店状态</td>
        <td>供应商状态</td>
        <td>&nbsp;</td>
      </tr>
      <?php $this->_tag_stack[] = array('supplieProducts', array('limit' => 20,'pager' => 'pager','page' => $this->_tpl_vars['segment']['page'],'order' => 'id desc','keywords' => $_GET['keywords'],'product_id' => $_GET['product_id'],'shopid' => $_GET['shopid'],'supplier_id' => $_GET['supplier_id'],'lprice' => $_GET['lprice'],'hprice' => $_GET['hprice'],'lstock' => $_GET['lstock'],'hstock' => $_GET['hstock'])); $_block_repeat=true;smarty_block_supplieProducts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
      <?php if ($this->_tpl_vars['pager']->rows > 0): ?>
          <tr id="content">
            <td><?php echo $this->_tpl_vars['products']['product_sku_id']; ?>
</td>
            <td><?php echo $this->_tpl_vars['products']['pid']; ?>
</td>
            <td height="50"><?php if ($this->_tpl_vars['products']['product_pic']): ?><img src="<?php echo $this->_tpl_vars['products']['product_pic']; ?>
" width="50" height="50" /><?php else: ?>暂无图片<?php endif; ?></td>
            <td><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=supplieProducts.php&uri=view&id=<?php echo $this->_tpl_vars['products']['id']; ?>
"><?php echo $this->_tpl_vars['products']['pname']; ?>
</a> <?php echo $this->_tpl_vars['products']['spec']; ?>
</td>
             <td><?php echo $this->_tpl_vars['products']['shop_name']; ?>
&nbsp;</td>
            <td>
            <?php if (! empty ( $this->_tpl_vars['products']['suppliers'] )): ?>
            <?php $_from = $this->_tpl_vars['products']['suppliers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['supplier']):
?>
            	<p><?php echo $this->_tpl_vars['supplier']['title']; ?>
(<?php if ($this->_tpl_vars['supplier']['classid']): ?><?php $this->_tag_stack[] = array('classes', array('id' => $this->_tpl_vars['supplier']['classid'])); $_block_repeat=true;smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo $this->_tpl_vars['classes']['title']; ?>
<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php else: ?>未指定<?php endif; ?>)</p>
            <?php endforeach; endif; unset($_from); ?>
            <?php else: ?>未指定<?php endif; ?>
            </td>
            <td><?php echo $this->_tpl_vars['products']['pricebuy']; ?>
&nbsp;</td>
            <td><?php echo $this->_tpl_vars['products']['currency_unit']; ?>
&nbsp;</td>
            <td><?php echo $this->_tpl_vars['products']['stock']; ?>
/<?php echo $this->_tpl_vars['products']['stock_base_num']; ?>
&nbsp;</td>
            <td><?php if ($this->_tpl_vars['products']['is_default']): ?>是<?php else: ?>否<?php endif; ?>&nbsp;</td>
            <td>
            	<?php if ('0' === $this->_tpl_vars['products']['pc_status']): ?><span style="color:gray">未送审</span><?php endif; ?>
                <?php if ("-2" === $this->_tpl_vars['products']['pc_status']): ?><span style="color:orange">已送审</span><?php endif; ?>
                <?php if ('1' === $this->_tpl_vars['products']['pc_status']): ?><span style="color:green">已上架</span><?php endif; ?>
                <?php if ('2' === $this->_tpl_vars['products']['pc_status']): ?><span style="color:blue">推荐</span><?php endif; ?>
                <?php if ("-1" === $this->_tpl_vars['products']['pc_status']): ?><span style="color:red">被驳回</span><?php endif; ?>
                <?php if ("-3" === $this->_tpl_vars['products']['pc_status'] || "-9" === $this->_tpl_vars['products']['pc_status']): ?><span style="color:#ccc">已下架</span><?php endif; ?>
            </td>
            <td>
            	<?php if ('0' === $this->_tpl_vars['products']['ms_status']): ?><span style="color:gray">未送审</span><?php endif; ?>
                <?php if ("-2" === $this->_tpl_vars['products']['ms_status']): ?><span style="color:orange">已送审</span><?php endif; ?>
                <?php if ('1' === $this->_tpl_vars['products']['ms_status']): ?><span style="color:green">已上架</span><?php endif; ?>
                <?php if ('2' === $this->_tpl_vars['products']['ms_status']): ?><span style="color:blue">推荐</span><?php endif; ?>
                <?php if ("-1" === $this->_tpl_vars['products']['ms_status']): ?><span style="color:red">被驳回</span><?php endif; ?>
                <?php if ("-3" === $this->_tpl_vars['products']['ms_status'] || "-9" === $this->_tpl_vars['products']['ms_status']): ?><span style="color:#ccc">已下架</span><?php endif; ?>
            </td>
            <td>
            	<?php if ('0' === $this->_tpl_vars['products']['status']): ?><span style="color:gray">未送审</span><?php endif; ?>
                <?php if ("-2" === $this->_tpl_vars['products']['status']): ?><span style="color:orange">已送审</span><?php endif; ?>
                <?php if ('1' === $this->_tpl_vars['products']['status']): ?><span style="color:green">已上架</span><?php endif; ?>
                <?php if ('2' === $this->_tpl_vars['products']['status']): ?><span style="color:blue">推荐</span><?php endif; ?>
                <?php if ("-1" === $this->_tpl_vars['products']['status']): ?><span style="color:red">被驳回</span><?php endif; ?>
                <?php if ("-3" === $this->_tpl_vars['products']['status'] || "-9" === $this->_tpl_vars['products']['status']): ?><span style="color:#ccc">已下架</span><?php endif; ?>
            </td>
            <td align="right">
            <?php $this->_tag_stack[] = array('rights', array('right' => 'products_remove')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=supplieProducts.php&uri=remove&id=<?php echo $this->_tpl_vars['products']['id']; ?>
" onclick="return confirm('删除产品数据后不可恢复, 确定删除?')">删除</a><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
            <?php $this->_tag_stack[] = array('rights', array('right' => 'products_modify')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=supplieProducts.php&uri=modify&id=<?php echo $this->_tpl_vars['products']['id']; ?>
">编辑</a><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
            </td>
          </tr>
      <?php endif; ?> 
      <?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_supplieProducts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
      <?php if ($this->_tpl_vars['pager']->rows == 0): ?>
      <tr id="content">
        <td colspan="20" style="text-align: center;">&nbsp;暂无产品</td>
      </tr>
      <?php endif; ?>
    </table>
    <div id="pager" class="mt10">
        <?php if ($this->_tpl_vars['pager']): ?> 共<?php echo $this->_tpl_vars['pager']->rows; ?>
条记录 第<?php echo $this->_tpl_vars['pager']->pagecurrent; ?>
/<?php echo $this->_tpl_vars['pager']->pages; ?>
页 <?php endif; ?> 		
        <?php if ($this->_tpl_vars['pager']->current > 1): ?><a href="<?php echo smarty_function_url(array('s1' => 1), $this);?>
">首页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current > 1): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->current-1), $this);?>
">上页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current < $this->_tpl_vars['pager']->pages): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->current+1), $this);?>
">下页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current < $this->_tpl_vars['pager']->pages): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->pages), $this);?>
">尾页</a><?php endif; ?>
    </div>
    <p>&nbsp;</p>
    <?php $this->_tag_stack[] = array('rights', array('right' => 'products_create')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><ul id="addmenu"><li><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=supplieProducts.php&uri=create">添加一个新的产品信息</a></li></ul><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/bottom.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>